//
//  NSDate+NSDate_NowToLastDate.m
//  投融保
//
//  Created by 523 on 14-1-13.
//  Copyright (c) 2014年 木叶科技. All rights reserved.
//

#import "NSDate+NSDate_NowToLastDate.h"

@implementation NSDate (NSDate_NowToLastDate)


-(NSDate *)getPriousDateFromDate:(NSDate *)date withMonth:(int)month
{
    NSDateComponents *comps = [[NSDateComponents alloc] init];
    [comps setMonth:month];
    NSCalendar *calender = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
    NSDate *mDate = [calender dateByAddingComponents:comps toDate:date options:0];
    return mDate;
}


@end
